For an overview of Stata, its survey analysis facilities and links to further sources of help with Stata click here
This introduction uses the data from exemplar 1, but is relevant to any exemplar. (1) You will need to be on a computer or a network with the Stata package installed.. (2 ) Double click on the link to the Stata data set (e.g. ex1.dta)for the exemplar you want to try. In a few seconds you will see the Stata screen and a small window where you can type commands. (3 ) The Stata results window shows you that you have opened the data set. Go to the window menu >data editor to view the data set. You will need to close this data editor if you want to make any changes to the data set or the commands will not run. |
(4) You can use the small window above to type commands. But there are better ways to run Stata commands. You can use the commands menus or you can use a "do" file with prepared code. The command menu echos your commands to the results screen, so you can copy them for future use. Try going to the statistics menu >survey data analysis >setup & utilities. You can define a variable to correspond to the sampling weight for your survey (e.g. weight in Exemplar 1, it must be in lower case as Stata is case sensitive). You will then see the commands and confirmation that they have worked coming up in the results window. To get rid of this setting for the weights get the menu again and clear all previous settings.
(5)The best way to run the exemplars is to use the "do" files provided for each one. Save the one you want to use (e.g. ex1.do) to a local directory on your computer. Then go to the window >do file editor and open it. Resize your windows so that you can see both the do file and the results window. Follow the instructions in the do file to run the code.
(6) You can find help on individual commands from the help menu. These will sometimes take you to dialogue boxes to run the commands. They can also be used to find help from the web.
(7) There are other Stata windows, such as the one that lists variables, that you might find useful. A web page that has helpful hints on this can be found at http://statlab.stat.yale.edu/help/workshops/Stata/.